-
Notifications
You must be signed in to change notification settings - Fork 798
[Driver] Fix preview breaking changes option passing to offload-wrapper #20708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Conversation
When passing options to the clang-offload-wrapper, the -fpreview-breaking-changes option needs to be passed accordingly to the tool when -fpreview-breaking-changes is used on the command line. This was happening for typical SYCL enabled compilations, but when using -fsycl-link, the usage of clang-offload-wrapper modifies the offloading kind encountered, causing the option to not be passed. Fixup the ability to pass -fpreview-breaking-changes for all needed uses as well as factoring in the offload-compress options which are in the same bucket of behaviors.
|
@intel/dpcpp-clang-driver-reviewers , please take a look. |
hchilama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a test case checking for offload-compress and offload-compression-level= ? if so LGTM
Is there a test case for this? |
| // and enabling preview breaking changes. | ||
| auto addCLIOptions = [&](ArgStringList &Args) -> void { | ||
| // -offload-compress | ||
| if (C.getInputArgs().getLastArg(options::OPT_offload_compress)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to be getLastArg and not just hasArg ?
| if (C.getInputArgs().getLastArg(options::OPT_offload_compress)) { | ||
| Args.push_back(C.getArgs().MakeArgString(Twine("-offload-compress"))); | ||
| // -offload-compression-level=<> | ||
| if (Arg *A = C.getInputArgs().getLastArg( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above.
Please update the description to also mention the changes related to : |
|
Precommit testing has this failure: |
When passing options to the clang-offload-wrapper, the -fpreview-breaking-changes option needs to be passed accordingly to the tool when -fpreview-breaking-changes is used on the command line. This was happening for typical SYCL enabled compilations, but when using -fsycl-link, the usage of clang-offload-wrapper modifies the offloading kind encountered, causing the option to not be passed.
Fixup the ability to pass -fpreview-breaking-changes for all needed uses as well as factoring in the offload-compress options which are in the same bucket of behaviors.